package com.craney.redTest
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	
	public class RedGrid 
	{
		public var fun : Function = function() : void
		{
			trace("This is a fun");
		}

		public function draw(drawClother : Sprite) : void
		{
			for(var i:int=0; i<10; i++)
			{
				for(var j:int=0; j<10; j++)
				{
					var mc : MovieClip = new Element(i, j);
					drawClother.addChild(mc); 
				}
			}
		}

	}
}

import flash.display.MovieClip;

internal class Element extends MovieClip
{
	public function Element(i:int, j:int)
	{
		graphics.beginFill(0xff0000);
		graphics.drawRect(0, 0, 10, 10);
		graphics.endFill();
		x = i * 11;
		y = j * 11;
	}
}